// ==UserScript==
// @name       schedule-prod
// @namespace  npm/vite-plugin-monkey
// @version    0.0.0
// @author     monkey
// @icon       https://vitejs.dev/logo.svg
// @match      http://schedule.corp.imdada.cn/*
// @require    https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js
// @require    https://cdn.jsdelivr.net/npm/vue@3.4.31/dist/vue.global.prod.js
// @grant      GM_addStyle
// ==/UserScript==

(t=>{if(typeof GM_addStyle=="function"){GM_addStyle(t);return}const e=document.createElement("style");e.textContent=t,document.head.append(e)})(" #float-ball{position:fixed;bottom:20px;right:20px;width:50px;height:50px;background-color:#007bff;color:#fff;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer;z-index:10001}#float-ball:hover{background-color:#0056b3} ");

(function (vue) {
  'use strict';

  const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
    __name: "ScheduleFillPage",
    setup(__props) {
      function handleClick() {
        const fields = {
          jobType: "4",
          projectId: "342",
          method: "POST",
          domainName: "http://compass.imdada.local",
          url: "/job/schedule/byBeanName",
          owner: "duanluyao,tianchaohui",
          retryCount: "0",
          applicationType: "FORM",
          params: "jobBeanName=",
          cron: "0 0 0 * * ?"
        };
        Object.entries(fields).forEach(([id, value]) => {
          const element = document.querySelector(`#${id}`);
          if (element) {
            element.value = value;
          }
        });
      }
      return (_ctx, _cache) => {
        return vue.openBlock(), vue.createElementBlock("div", {
          id: "float-ball",
          onClick: handleClick
        }, "填充");
      };
    }
  });
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
    __name: "App",
    setup(__props) {
      return (_ctx, _cache) => {
        return vue.openBlock(), vue.createBlock(_sfc_main$1);
      };
    }
  });
  vue.createApp(_sfc_main).mount(
    (() => {
      const app = document.createElement("div");
      document.body.append(app);
      return app;
    })()
  );

})(Vue);